package cn.yerly.sakura.dao.model;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
/**
 * 产品分类
 * @author yerly
 *
 */
@Entity
public class Category {
	@Id
	private Long id;
	private String name;
	@ManyToOne
	private Image icon;
	@ManyToOne
	private Category parent;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Image getIcon() {
		return icon;
	}

	public void setIcon(Image icon) {
		this.icon = icon;
	}

	public Category getParent() {
		return parent;
	}

	public void setParent(Category parent) {
		this.parent = parent;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "Category [id=" + id + ", name=" + name + ", icon=" + icon
				+ ", parent=" + parent + ", disabled=" + disabled + "]";
	}

}
